package com.itheima.security.distributed.uaa.service;

import lombok.Getter;
import lombok.Setter;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.User;

import java.util.Collection;

/**
 * @author: yangguoxiong
 * @date: 2022/3/8 15:31
 * @description:
 */
@Getter
@Setter
public class AuthUserDetails extends User {

    private Long userId;

    private String roleName;

    public AuthUserDetails(Long userId, String username, String password, Collection<? extends GrantedAuthority> authorities, String roleName) {
        super(username, password, authorities);
        this.userId = userId;
        this.roleName = roleName;
    }
}
